#include <stdio.h>
#include <unistd.h>
#include <unistd.h>
#include <string.h>
const char* rotate="|\\-/";
void processbar()
{
    char str[102];
    memset(str,'\0',sizeof(str));
    for(int i=0;i<=100;i++){
        printf("[%-100s][%d%%][%c]\r",str,i,rotate[i%4]);
        str[i]='-';
        fflush(stdout);
        sleep(100000);
        if(i<=99) str[i+1]='>';
    }
    printf("\n");
}


int main()
{
    processbar();
    return 0;
}
